package com.silence.tool.common;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author silence
 * @email 792245022@qq.com
 * @create 2023-08-28 16:27
 */
@Data
@Builder
@Accessors(chain = true)
@Schema(name = "Result", description = "共通返回结果")
public class Result<T> implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 响应码
     */
    @Schema(description = "响应码")
    private int code;

    /**
     * 响应数据
     */
    @Schema(description = "响应数据")
    private T data;

    /**
     * 响应消息
     */
    @Schema(description = "响应消息")
    private String msg;

}
